public class Car {
    int engine;//发动机
    int tyre;//轮胎
    int frame;//车架
    int chassis;//底盘
    String appearance;//外观
    double price;//价格
    double oilConsumption;//油耗
    String start;
    String stop;
    String whistle;

    public void show() {
        System.out.println("汽车由" + engine + "个发动机," + tyre + "个轮胎," + frame + "个车架," +
                chassis + "个底盘组成" + "\t" + "外观" + appearance + "\t" + "价格" + price + "万元" + "\t" + "油耗" +
                oilConsumption + "L");
    }
    Engine e=new Engine();
    public void start(){
        System.out.println("车要"+start+"了");
        e.start();

    }
    public void stop(){
        System.out.println("车要"+stop+"了");
    }public void whistle(){
        System.out.println("车要"+whistle+"了");
    }


}

